package com.dragon.modules.yuegou.query.wallet;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.wallet.MemberCardGrantEntity;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 企业发放会员悦卡（发放明细） 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2019-06-03 15:20:36
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class MemberCardGrantQuery extends MemberCardGrantEntity implements Query<MemberCardGrantEntity> {

    /** 查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 悦卡发放记录ID查询条件 */
	@JsonUnwrapped(prefix = "cardGrantId")
	private Condition<String> cardGrantIdCondition;

    /** 发放企业ID查询条件 */
	@JsonUnwrapped(prefix = "companyId")
	private Condition<String> companyIdCondition;

    /** 企业名称查询条件 */
	@JsonUnwrapped(prefix = "companyName")
	private Condition<String> companyNameCondition;

    /** 悦卡模板ID查询条件 */
	@JsonUnwrapped(prefix = "cardTemplateId")
	private Condition<String> cardTemplateIdCondition;

    /** 悦卡名称查询条件 */
	@JsonUnwrapped(prefix = "cardTemplateTitle")
	private Condition<String> cardTemplateTitleCondition;

    /** 悦卡面值查询条件 */
	@JsonUnwrapped(prefix = "cardTemplateAmount")
	private Condition<BigDecimal> cardTemplateAmountCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "memberId")
	private Condition<String> memberIdCondition;

    /** 会员手机号查询条件 */
	@JsonUnwrapped(prefix = "memberMobile")
	private Condition<String> memberMobileCondition;

    /** 员工id查询条件 */
	@JsonUnwrapped(prefix = "employeesId")
	private Condition<String> employeesIdCondition;

    /** 是否发放（1已发放、0未发放）查询条件 */
	@JsonUnwrapped(prefix = "granted")
	private Condition<Boolean> grantedCondition;

    /** 发放的会员悦卡ID（发放时填入）查询条件 */
	@JsonUnwrapped(prefix = "grantedMemberCardId")
	private Condition<String> grantedMemberCardIdCondition;

    /** 创建时间查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

    /** 生成时间查询条件 */
	@JsonUnwrapped(prefix = "grantedTime")
	private Condition<LocalDateTime> grantedTimeCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public MemberCardGrantQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public MemberCardGrantQuery(MemberCardGrantEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public MemberCardGrantQuery(MemberCardGrantQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.cardGrantIdCondition != null) {
			this.cardGrantIdCondition = other.cardGrantIdCondition.copy();
		}
		if(other.companyIdCondition != null) {
			this.companyIdCondition = other.companyIdCondition.copy();
		}
		if(other.companyNameCondition != null) {
			this.companyNameCondition = other.companyNameCondition.copy();
		}
		if(other.cardTemplateIdCondition != null) {
			this.cardTemplateIdCondition = other.cardTemplateIdCondition.copy();
		}
		if(other.cardTemplateTitleCondition != null) {
			this.cardTemplateTitleCondition = other.cardTemplateTitleCondition.copy();
		}
		if(other.cardTemplateAmountCondition != null) {
			this.cardTemplateAmountCondition = other.cardTemplateAmountCondition.copy();
		}
		if(other.memberIdCondition != null) {
			this.memberIdCondition = other.memberIdCondition.copy();
		}
		if(other.memberMobileCondition != null) {
			this.memberMobileCondition = other.memberMobileCondition.copy();
		}
		if(other.employeesIdCondition != null) {
			this.employeesIdCondition = other.employeesIdCondition.copy();
		}
		if(other.grantedCondition != null) {
			this.grantedCondition = other.grantedCondition.copy();
		}
		if(other.grantedMemberCardIdCondition != null) {
			this.grantedMemberCardIdCondition = other.grantedMemberCardIdCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
		if(other.grantedTimeCondition != null) {
			this.grantedTimeCondition = other.grantedTimeCondition.copy();
		}
	}

	@Override
	public QueryWrapper<MemberCardGrantEntity> toQueryWrapper() {
		QueryWrapper<MemberCardGrantEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (cardGrantIdCondition != null) {
			cardGrantIdCondition.toWrapper(wrapper, COL_CARD_GRANT_ID);
		}
		if (companyIdCondition != null) {
			companyIdCondition.toWrapper(wrapper, COL_COMPANY_ID);
		}
		if (companyNameCondition != null) {
			companyNameCondition.toWrapper(wrapper, COL_COMPANY_NAME);
		}
		if (cardTemplateIdCondition != null) {
			cardTemplateIdCondition.toWrapper(wrapper, COL_CARD_TEMPLATE_ID);
		}
		if (cardTemplateTitleCondition != null) {
			cardTemplateTitleCondition.toWrapper(wrapper, COL_CARD_TEMPLATE_TITLE);
		}
		if (cardTemplateAmountCondition != null) {
			cardTemplateAmountCondition.toWrapper(wrapper, COL_CARD_TEMPLATE_AMOUNT);
		}
		if (memberIdCondition != null) {
			memberIdCondition.toWrapper(wrapper, COL_MEMBER_ID);
		}
		if (memberMobileCondition != null) {
			memberMobileCondition.toWrapper(wrapper, COL_MEMBER_MOBILE);
		}
		if (employeesIdCondition != null) {
			employeesIdCondition.toWrapper(wrapper, COL_EMPLOYEES_ID);
		}
		if (grantedCondition != null) {
			grantedCondition.toWrapper(wrapper, COL_GRANTED);
		}
		if (grantedMemberCardIdCondition != null) {
			grantedMemberCardIdCondition.toWrapper(wrapper, COL_GRANTED_MEMBER_CARD_ID);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		if (grantedTimeCondition != null) {
			grantedTimeCondition.toWrapper(wrapper, COL_GRANTED_TIME);
		}
		return wrapper;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param idCondition 查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回悦卡发放记录ID查询条件
	 * 
	 * @return cardGrantIdCondition 悦卡发放记录ID查询条件
	 */
	public Condition<String> cardGrantId() {
		this.cardGrantIdCondition = new Condition<>();
		return this.cardGrantIdCondition;
	}
	
	/**
	 * 获取悦卡发放记录ID查询条件
	 * 
	 * @return cardGrantIdCondition 悦卡发放记录ID查询条件
	 */
	public Condition<String> getCardGrantIdCondition() {
		return cardGrantIdCondition;
	}

	/**
	 * 设置悦卡发放记录ID查询条件
	 * 
	 * @param cardGrantIdCondition 悦卡发放记录ID查询条件
	 */
	public void setCardGrantIdCondition(Condition<String> cardGrantIdCondition) {
		this.cardGrantIdCondition = cardGrantIdCondition;
	}

	/**
	 * 构造并返回发放企业ID查询条件
	 * 
	 * @return companyIdCondition 发放企业ID查询条件
	 */
	public Condition<String> companyId() {
		this.companyIdCondition = new Condition<>();
		return this.companyIdCondition;
	}
	
	/**
	 * 获取发放企业ID查询条件
	 * 
	 * @return companyIdCondition 发放企业ID查询条件
	 */
	public Condition<String> getCompanyIdCondition() {
		return companyIdCondition;
	}

	/**
	 * 设置发放企业ID查询条件
	 * 
	 * @param companyIdCondition 发放企业ID查询条件
	 */
	public void setCompanyIdCondition(Condition<String> companyIdCondition) {
		this.companyIdCondition = companyIdCondition;
	}

	/**
	 * 构造并返回企业名称查询条件
	 * 
	 * @return companyNameCondition 企业名称查询条件
	 */
	public Condition<String> companyName() {
		this.companyNameCondition = new Condition<>();
		return this.companyNameCondition;
	}
	
	/**
	 * 获取企业名称查询条件
	 * 
	 * @return companyNameCondition 企业名称查询条件
	 */
	public Condition<String> getCompanyNameCondition() {
		return companyNameCondition;
	}

	/**
	 * 设置企业名称查询条件
	 * 
	 * @param companyNameCondition 企业名称查询条件
	 */
	public void setCompanyNameCondition(Condition<String> companyNameCondition) {
		this.companyNameCondition = companyNameCondition;
	}

	/**
	 * 构造并返回悦卡模板ID查询条件
	 * 
	 * @return cardTemplateIdCondition 悦卡模板ID查询条件
	 */
	public Condition<String> cardTemplateId() {
		this.cardTemplateIdCondition = new Condition<>();
		return this.cardTemplateIdCondition;
	}
	
	/**
	 * 获取悦卡模板ID查询条件
	 * 
	 * @return cardTemplateIdCondition 悦卡模板ID查询条件
	 */
	public Condition<String> getCardTemplateIdCondition() {
		return cardTemplateIdCondition;
	}

	/**
	 * 设置悦卡模板ID查询条件
	 * 
	 * @param cardTemplateIdCondition 悦卡模板ID查询条件
	 */
	public void setCardTemplateIdCondition(Condition<String> cardTemplateIdCondition) {
		this.cardTemplateIdCondition = cardTemplateIdCondition;
	}

	/**
	 * 构造并返回悦卡名称查询条件
	 * 
	 * @return cardTemplateTitleCondition 悦卡名称查询条件
	 */
	public Condition<String> cardTemplateTitle() {
		this.cardTemplateTitleCondition = new Condition<>();
		return this.cardTemplateTitleCondition;
	}
	
	/**
	 * 获取悦卡名称查询条件
	 * 
	 * @return cardTemplateTitleCondition 悦卡名称查询条件
	 */
	public Condition<String> getCardTemplateTitleCondition() {
		return cardTemplateTitleCondition;
	}

	/**
	 * 设置悦卡名称查询条件
	 * 
	 * @param cardTemplateTitleCondition 悦卡名称查询条件
	 */
	public void setCardTemplateTitleCondition(Condition<String> cardTemplateTitleCondition) {
		this.cardTemplateTitleCondition = cardTemplateTitleCondition;
	}

	/**
	 * 构造并返回悦卡面值查询条件
	 * 
	 * @return cardTemplateAmountCondition 悦卡面值查询条件
	 */
	public Condition<BigDecimal> cardTemplateAmount() {
		this.cardTemplateAmountCondition = new Condition<>();
		return this.cardTemplateAmountCondition;
	}
	
	/**
	 * 获取悦卡面值查询条件
	 * 
	 * @return cardTemplateAmountCondition 悦卡面值查询条件
	 */
	public Condition<BigDecimal> getCardTemplateAmountCondition() {
		return cardTemplateAmountCondition;
	}

	/**
	 * 设置悦卡面值查询条件
	 * 
	 * @param cardTemplateAmountCondition 悦卡面值查询条件
	 */
	public void setCardTemplateAmountCondition(Condition<BigDecimal> cardTemplateAmountCondition) {
		this.cardTemplateAmountCondition = cardTemplateAmountCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return memberIdCondition 查询条件
	 */
	public Condition<String> memberId() {
		this.memberIdCondition = new Condition<>();
		return this.memberIdCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return memberIdCondition 查询条件
	 */
	public Condition<String> getMemberIdCondition() {
		return memberIdCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param memberIdCondition 查询条件
	 */
	public void setMemberIdCondition(Condition<String> memberIdCondition) {
		this.memberIdCondition = memberIdCondition;
	}

	/**
	 * 构造并返回会员手机号查询条件
	 * 
	 * @return memberMobileCondition 会员手机号查询条件
	 */
	public Condition<String> memberMobile() {
		this.memberMobileCondition = new Condition<>();
		return this.memberMobileCondition;
	}
	
	/**
	 * 获取会员手机号查询条件
	 * 
	 * @return memberMobileCondition 会员手机号查询条件
	 */
	public Condition<String> getMemberMobileCondition() {
		return memberMobileCondition;
	}

	/**
	 * 设置会员手机号查询条件
	 * 
	 * @param memberMobileCondition 会员手机号查询条件
	 */
	public void setMemberMobileCondition(Condition<String> memberMobileCondition) {
		this.memberMobileCondition = memberMobileCondition;
	}

	/**
	 * 构造并返回员工id查询条件
	 * 
	 * @return employeesIdCondition 员工id查询条件
	 */
	public Condition<String> employeesId() {
		this.employeesIdCondition = new Condition<>();
		return this.employeesIdCondition;
	}
	
	/**
	 * 获取员工id查询条件
	 * 
	 * @return employeesIdCondition 员工id查询条件
	 */
	public Condition<String> getEmployeesIdCondition() {
		return employeesIdCondition;
	}

	/**
	 * 设置员工id查询条件
	 * 
	 * @param employeesIdCondition 员工id查询条件
	 */
	public void setEmployeesIdCondition(Condition<String> employeesIdCondition) {
		this.employeesIdCondition = employeesIdCondition;
	}

	/**
	 * 构造并返回是否发放（1已发放、0未发放）查询条件
	 * 
	 * @return grantedCondition 是否发放（1已发放、0未发放）查询条件
	 */
	public Condition<Boolean> granted() {
		this.grantedCondition = new Condition<>();
		return this.grantedCondition;
	}
	
	/**
	 * 获取是否发放（1已发放、0未发放）查询条件
	 * 
	 * @return grantedCondition 是否发放（1已发放、0未发放）查询条件
	 */
	public Condition<Boolean> getGrantedCondition() {
		return grantedCondition;
	}

	/**
	 * 设置是否发放（1已发放、0未发放）查询条件
	 * 
	 * @param grantedCondition 是否发放（1已发放、0未发放）查询条件
	 */
	public void setGrantedCondition(Condition<Boolean> grantedCondition) {
		this.grantedCondition = grantedCondition;
	}

	/**
	 * 构造并返回发放的会员悦卡ID（发放时填入）查询条件
	 * 
	 * @return grantedMemberCardIdCondition 发放的会员悦卡ID（发放时填入）查询条件
	 */
	public Condition<String> grantedMemberCardId() {
		this.grantedMemberCardIdCondition = new Condition<>();
		return this.grantedMemberCardIdCondition;
	}
	
	/**
	 * 获取发放的会员悦卡ID（发放时填入）查询条件
	 * 
	 * @return grantedMemberCardIdCondition 发放的会员悦卡ID（发放时填入）查询条件
	 */
	public Condition<String> getGrantedMemberCardIdCondition() {
		return grantedMemberCardIdCondition;
	}

	/**
	 * 设置发放的会员悦卡ID（发放时填入）查询条件
	 * 
	 * @param grantedMemberCardIdCondition 发放的会员悦卡ID（发放时填入）查询条件
	 */
	public void setGrantedMemberCardIdCondition(Condition<String> grantedMemberCardIdCondition) {
		this.grantedMemberCardIdCondition = grantedMemberCardIdCondition;
	}

	/**
	 * 构造并返回创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置创建时间查询条件
	 * 
	 * @param createdTimeCondition 创建时间查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

	/**
	 * 构造并返回生成时间查询条件
	 * 
	 * @return grantedTimeCondition 生成时间查询条件
	 */
	public Condition<LocalDateTime> grantedTime() {
		this.grantedTimeCondition = new Condition<>();
		return this.grantedTimeCondition;
	}
	
	/**
	 * 获取生成时间查询条件
	 * 
	 * @return grantedTimeCondition 生成时间查询条件
	 */
	public Condition<LocalDateTime> getGrantedTimeCondition() {
		return grantedTimeCondition;
	}

	/**
	 * 设置生成时间查询条件
	 * 
	 * @param grantedTimeCondition 生成时间查询条件
	 */
	public void setGrantedTimeCondition(Condition<LocalDateTime> grantedTimeCondition) {
		this.grantedTimeCondition = grantedTimeCondition;
	}

}
